
let interval = null;
let num = 0;
console.log(interval);
interval = setTimeout(function () {
    num++;
    console.log('计时时间到' + num);
}, 10);
console.log(interval);
console.log(interval !== null);
clearTimeout(interval);
console.log(clearTimeout(interval));
function father() {
    console.log('调用father');
    interval = setInterval(function () {
        num++;
        console.log('计时时间到' + num);
        clearInterval(interval);
        father();
    }, 10);
}

// father();